package com.atguigu.day08.p3;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/8 14:24
 * @注释
 */
public class Student {
    private String name;
    private int age;
    private char gender;
    public void setName(String name) {
        this.name = name;
    }
    public void setAge(int age) {
        if(age > 0 && age < 150) {
            this.age = age;
        }
    }
    public void setGender(char gender) {
        if(gender == '男' || gender == '女') {
            this.gender = gender;
        }else{
            System.out.println("哥们你人妖啊");
        }
    }
    public String getName() {
        return name;
    }
    public int getAge() {
        return age;
    }
    public char getGender() {
        return gender;
    }
}
